Repository navigation
fix(github-backup): bound inventory_owner pagination and skip malformed nodes (#6840) - #7934
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Fixes #6840 — remainder after PR #6574.
What was already on main (verified this run)
PR #6574 already landed the cursor-progress half of #6840:
inventory_ownerraises a namedRuntimeErrorwhen a page reportshasNextPagewith a null/empty/repeatedendCursor, with stubbed tests for all three cursor cases (36/36 checks passing before this change).What this PR adds (the remaining acceptance criteria)
Reproduced on current main before changing anything (real
ghb_common.py,runstubbed):nullnode raisesTypeError: 'NoneType' object is not subscriptablenameWithOwnerraisesKeyError: 'nameWithOwner'Changes in
infra/github-backup/bin/ghb_common.py:MAX_INVENTORY_PAGES = 1000(100 repos/page = 100,000 repos per owner, far above any real owner's page count). Exceeding it withhasNextPagestill true raises aRuntimeErrornaming the owner and the bound, soinventory()records an owner error and reconcile's last-known-good retention (github-backup(inventory): a null repositoryOwner is silently read as 'this owner has no repos' — reconcile drops the owner's mirrors from plan.json and MANIFEST.json and exits 0 #3229) engages instead of the weekly sweep hanging.nameWithOwneris named on stderr (owner, page, node index, shape) and skipped; the rest of the owner's inventory proceeds.isFork/isArchivedare now read with.get()like the other optional node fields.Tests
infra/github-backup/tests/test_inventory_owner.py(stubbed-runoracle, expected outcomes = the #6840 acceptance criteria):inventory_ownerreturns only the good repoRuntimeErrornaming owner + bound, transport calls stop at exactly 3,inventory()records the owner errorResults on the laptop: targeted file 51/51 checks passed (36 pre-existing + 15 new); the full github-backup regression suite (the
github-backup-tests.ymlloop, all 12test_*.pyfiles) passes.🤖 Queue worker lane code-u (fallback mode — queue backend down, claim carried on issue #6840).
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.